<!DOCTYPE html>
<html lang="en">

<head>
     <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>星火编舟</title>
    <link rel="icon" type="image/png" href="../static/images/网页头_logo星火编舟.png">
    <link rel="stylesheet" type="text/css" href="../static/css/teacher.css">
    <link rel="stylesheet" type="text/css" href="../static/css/style.css">




    <style>
        * {
            margin: 0;
            padding: 0;
        }

        li {
            list-style: none;
        }

        a {
            text-decoration: none;
            color: white;
        }

        .header {
            position: relative;
            width: 100%;
            height: 55px;
            background-color: black;
        }

        .left {
            position: absolute;
            left: 20px;
            font-size: 20px;
            line-height: 55px;
            color: white;
            text-align: center;
        }

        .right {
            position: absolute;
            right: 160px;
            line-height: 55px;
            color: white;
            text-align: center;
        }

        .right_right {
            position: absolute;
            right: 24px;
            line-height: 55px;
            color: white;
            text-align: center;
        }

        .leftside {
            float: left;
            background-color: rgb(245, 245, 245);
            /* height: 663px; */
            width: 200px;
        }


        .leftside .first {
            background-color: rgb(66, 139, 202);
            margin-top: 25px;

        }

        .leftside .first a {
            color: white;

        }

        .leftside ul li {

            border-bottom: 0.2px solid white;

            font-size: 20px;
            height: 60px;
            line-height: 60px;
            width: 100%;
            text-align: center;
        }

        .leftside ul li a {
            color: black;
        }

        .container-fluid {
            position: relative;
            top: 35px;
            left: 70px;
        }

        .table-responsive {

            margin-top: 10px;
        }



        tbody tr td .long {
            width: 270px;
            height: 30px;
        }

        tbody tr td .last {
            height: 40px;
            width: 60px;
        }
    </style>
</head>

<body>
<header>
        <nav>
            <ul>
                 <li><a href="http://127.0.0.1:5000/index2">主页</a></li>
                <li><a href="http://127.0.0.1:5000/Practical%20Courses2">实践课程</a></li>
                <li><a href="http://127.0.0.1:5000/One-on-one%20Tutoring2">一对一辅导</a></li>
                <li><a href="http://127.0.0.1:5000/student">教学管理</a></li>
                <li><a href="https://n1ks53vcj7t.feishu.cn/docx/R8GgdKk0io0DcRxPcTNckISnnNg?from=from_copylink" target="_blank">使用帮助</a></li>
                <li><a href="http://127.0.0.1:5000/About Us2">关于我们</a></li>

                <li><a href="/logout">注销</a></li>


            </ul>
        </nav>
    </header>

    <div class="leftside">
        <ul>
            <li><a href="/student">学生信息录入</a></li>
            <li><a href="/teacher">选课信息录入</a></li>
            <li class="first"><a href="#">成绩信息录入</a></li>
            <li><a href="/grade_infos">学生成绩查询</a></li>
            <li><a href="/adminstator">系统管理员变动</a></li>

        </ul>

    </div>
    <div class="container-fluid">
        <h1 class="sub-header">学 生 成 绩 信 息 录 入 系 统</h1>
        
        
        &nbsp;&nbsp;
        <hr>
        <!-- 在页面中添加文件上传表单 -->
        <td>
            <form action="/upload_grades" method="post" enctype="multipart/form-data">
                <label for="fileInput">成绩批量导入：</label>
                <input type="file" id="fileInput" name="file" style="display: inline-block;">
                <input class="last" type="submit" value="导入" />
            </form>
        </td>
        <hr>    
        <!-- ------------------------ -->
        <div class="table-responsive">
            <table class="table table-striped">
                <thead>
                    <tr>
                        
                        <th>学号</th>
                        <th>课程号</th>
                        <th>成绩</th>
                        <th>操作</th>

                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <form action="" method="post">
                            <td><input class="long" name="student_id" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                            <td><input class="long" name="student_class_id" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td><input class="long" name="grade"
                                    type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td><input class="last" type="submit" value="提交" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
                            <td><span>提交结果:{{insert_result}}</span></td>
                            
                        </form>
                    </tr>
                    <tr>
                        <td>学生学号</td>
                        <td>所选课程号</td>
                        <td>课程成绩</td>
                    </tr>
                    {% for result in results %}
                    <tr>
                        <td>{{result[0]}}</td>
                        <td>{{result[1]}}</td>
                        <td>{{result[2]}}</td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>

        </div>
    </div>

</body>



</html>